package com.jmult.config;

import com.jfinal.config.Constants;
import com.jfinal.config.Handlers;
import com.jfinal.config.Interceptors;
import com.jfinal.config.JFinalConfig;
import com.jfinal.config.Plugins;
import com.jfinal.config.Routes;
import com.jfinal.server.undertow.UndertowServer;
import com.jfinal.template.Engine;
import com.jmult.crop.CropperController;

public class JFinalCropperConfig extends JFinalConfig {

	public static void main(String[] args) {
		UndertowServer.start(JFinalCropperConfig.class);
	}

	@Override
	public void configConstant(Constants me) {
		// 设置开发模式
		me.setDevMode(true);
		me.setInjectDependency(true);
	}

	@Override
	public void configRoute(Routes me) {
		me.setBaseViewPath("/_view");
		me.add("/", CropperController.class);
	}

	@Override
	public void configEngine(Engine me) {
		me.addSharedFunction("/_view/_common/_paginate.html");
	}

	@Override
	public void configPlugin(Plugins me) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void configInterceptor(Interceptors me) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void configHandler(Handlers me) {
		// TODO Auto-generated method stub
		
	}

}
